Skip to content

feat!: introduce a Kotlin DSL#5115

Merged
DanySK merged 207 commits intomasterfrom
feat/dsl2
Feb 15, 2026
Merged

feat!: introduce a Kotlin DSL#5115
DanySK merged 207 commits intomasterfrom
feat/dsl2

Conversation

@DanySK
Copy link
Member

@DanySK DanySK commented Feb 9, 2026

No description provided.

Add the simulation entry point for building dsl files, using Continuous2DEnvironment as default environment
Introduce dsl support for defining deployments using any Deployment<*> type
add dsl support for defining contents inside a deployment
add a helper function that allows to test if a loader generated by the dsl is the same as a loader generated by a yml file
now we also compare two simulations after running them for few steps.
add @BuildDsl annotation to automatically generate helper functions
add @BuildDsl annotation to automatically generate helper functions
@mergify
Copy link
Contributor

mergify bot commented Feb 15, 2026

Hi @DanySK! 👋
This pull request has conflicts 😖
Could you fix it? 🔧
Thank you! 🙏

@mergify
Copy link
Contributor

mergify bot commented Feb 15, 2026

Hi @DanySK! 👋
This pull request has conflicts 😖
Could you fix it? 🔧
Thank you! 🙏

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.53%. Comparing base (4d75038) to head (16e24e1).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5115   +/-   ##
=========================================
  Coverage     61.53%   61.53%           
  Complexity       14       14           
=========================================
  Files             2        2           
  Lines            78       78           
  Branches          4        4           
=========================================
  Hits             48       48           
  Misses           24       24           
  Partials          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a Kotlin DSL as an alternative to YAML configuration files for defining Alchemist simulations. This is a significant feature addition that provides a type-safe, programmatic way to configure simulations.

Changes:

  • Adds two new modules: alchemist-kotlinscript for script execution and alchemist-factories-generator for KSP-based code generation
  • Introduces breaking API changes to remove redundant parameters from core interfaces (Incarnation, GenericNode)
  • Changes Environment.layers from ListSet<Layer> to Map<Molecule, Layer> for better type safety
  • Adds comprehensive DSL context interfaces using Kotlin context receivers
  • Includes test coverage with equivalence tests comparing DSL and YAML outputs

Reviewed changes

Copilot reviewed 205 out of 212 changed files in this pull request and generated no comments.

Show a summary per file
File Description
settings.gradle.kts Adds two new modules to the build
alchemist-kotlinscript/** New module for Kotlin script compilation and execution
alchemist-factories-generator/** New KSP processor module for generating factory code
alchemist-loading/src/main/kotlin/it/unibo/alchemist/boundary/kotlindsl/** Core DSL context interfaces and implementations
alchemist-loading/src/test/kotlin/it/unibo/alchemist/boundary/kotlindsl/** DSL test suite with equivalence tests
alchemist-api/src/main/java/it/unibo/alchemist/model/Incarnation.java Removes redundant time parameter from factory methods
alchemist-implementationbase/src/main/kotlin/it/unibo/alchemist/model/nodes/GenericNode.kt Removes redundant incarnation parameter from constructor
alchemist-api/src/main/kotlin/it/unibo/alchemist/model/Environment.kt Changes layers from ListSet to Map
Various incarnation modules Updates to match new API signatures
Build configuration files Adds KSP support and context parameters compiler flag
Files not reviewed (1)
  • .idea/codeStyles/Project.xml: Language not supported

@DanySK DanySK merged commit c8e16b6 into master Feb 15, 2026
32 of 33 checks passed
@DanySK DanySK deleted the feat/dsl2 branch February 15, 2026 23:03
DanySK pushed a commit that referenced this pull request Feb 16, 2026
## [43.0.0](42.4.2...43.0.0) (2026-02-16)

### ⚠ BREAKING CHANGES

* introduce a Kotlin DSL (#5115)

### Features

* introduce a Kotlin DSL ([#5115](#5115)) ([c8e16b6](c8e16b6))

### Dependency updates

* **core-deps:** update react to v2026.2.13-19.2.4 (patch) ([#5141](#5141)) ([b08cb80](b08cb80))
* **deps:** update junit-framework monorepo to v6.0.3 (patch) ([#5140](#5140)) ([f1a16cb](f1a16cb))

### General maintenance

* **build:** update the javadoc.io cache ([fbdbd63](fbdbd63))
* **build:** update the javadoc.io cache ([4d75038](4d75038))
@DanySK
Copy link
Member Author

DanySK commented Feb 16, 2026

🎉 This PR is included in version 43.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants